package com.woniu.defecttracking.service;

import com.woniu.defecttracking.dto.RuleDto;
import com.woniu.defecttracking.dto.RulePageDto;
import com.woniu.defecttracking.entity.Rule;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.defecttracking.exception.RoleException;
import com.woniu.defecttracking.exception.RuleException;
import com.woniu.defecttracking.param.AddRuleParam;
import com.woniu.defecttracking.param.FindRuleParam;
import com.woniu.defecttracking.param.UpdateRuleParam;

import java.util.List;

/**
 * <p>
 *  rule的service类
 * </p>
 *
 * @author tiangle
 * @since 2021-12-31
 */
public interface RuleService extends IService<Rule> {

    List<RuleDto> getRules();

    List<RuleDto> getRulesByIds(List<Integer> ids) throws RuleException;

    RulePageDto findRule(FindRuleParam findRuleParam);

    RuleDto saveRule(AddRuleParam addRuleParam) throws RuleException;

    Boolean changeRule(Integer id) throws RuleException;

    Boolean updateRule(UpdateRuleParam updateRuleParam) throws RuleException;

    Boolean removeRule(List<Integer> ids);


}
